package com.jiuwan.gamepass.dao.authDao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiuwan.gamepass.pojo.authPojo.SysRole;
import com.jiuwan.gamepass.pojo.authPojo.SysUser;
import com.jiuwan.gamepass.pojo.model.MyUserDetails;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Component
@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    //根据用户名查询用户
    SysUser selectByUsername (String username);

    //查找所有用户名
    List<SysUser> selectAll();

    //根据用户名删除用户
    int deleteByUsername(String username);

    //根据用户姓名查询所属角色
    String  selectRoleByUsername(String username);


    //根据角色查到所拥有的权限
    List<String> selectApiUrlByRole(String role);



}